package com.hospital.user.registration.service.Imp;


import com.hospital.user.registration.dao.LoginI;
import com.hospital.user.registration.dao.User_Disease_infoi;
import com.hospital.user.registration.entity.Ct_user;
import com.hospital.user.registration.entity.DiseaseInfo;
import com.hospital.user.registration.entity.User;
import com.hospital.user.registration.service.LoginServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoginService implements LoginServiceI {

    @Autowired
    private LoginI login;

    @Autowired
    private User_Disease_infoi infoi;

    public boolean login(User user) {
        return login.register(user);
    }

    @Override
    public User selectUser(String id) {

        return login.result(id);
    }

    @Override
    public List<DiseaseInfo> selectDis(String id) {

        return infoi.selectInfo(id);
    }

    @Override
    public List<Ct_user> selectCt(String id) {

        return login.resultCt(id);
    }

}
